package com.bosc.automationui.controller;

import com.bosc.automationui.service.ETLDependencyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

@CrossOrigin
@RestController
@RequestMapping(value = "/dependency")
public class DependencyController {
    @Autowired
    private ETLDependencyService etlDependencyService;

    @GetMapping(value = "/search")
    public HashMap<String,Object> getDependencyChain(@RequestParam String predicate) {
        return etlDependencyService.searchDependencyChain(predicate);
    }
}
